<template>
  <div>
    <h2>父组件切换选择下拉框，子组件加载列表</h2>
    <select @change="t_cat_pk = $event.target.value">
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
    </select>
    <sub-component :modelValue="t_cat_pk"></sub-component>
  </div>
</template>

<script lang="ts" setup>
import {ref} from "vue";
import SubComponent from "./sub-component.vue";

const t_cat_pk = ref("");

// function handleChange(value:string) {
//     t_cat_pk.value = value;
// }

</script>

<style>
</style>